#include <iostream>
using namespace std;

class Car
{
public:
    // 构造函数
    Car(int id, string brand, int price)
    {
        cout << "我是构造函数" << endl;
        this->id = id;                      //this指针，区别参数与私有成员
        this->brand = brand;
        this->price = price;
    }
    void show()
    {
        cout << "id: " << id << endl;
        cout << "brand: " << brand << endl;
        cout << "price: " << price << endl;
    }

private:
    // 车牌、品牌、价格
    int id;
    string brand;
    int price;
};


int main()
{
    Car c1(1001, "奔驰", 1000000);
    c1.show();
    return 0;
}